<template>
    <div class='swiper-main'>
        <van-swipe :autoplay="2000" :duration="1000" class="swiper-container">
            <van-swipe-item v-for="(image, index) in swiperList" :key="index">
                <img v-lazy="image.imgUrl" />
            </van-swipe-item>
        </van-swipe>
    </div>
</template>

<script>
import Vue from 'vue';
import { Lazyload } from 'vant';
Vue.use(Lazyload);
export default {
    name: 'Swiper',
    props: {
        swiperList: Array
    },
    mounted () {
        console.log(this.swiperList);
    }
}
</script>

<style scoped>
.swiper-main {
    position: relative;
    width: 100%;
    height: 4.4rem;
}
.swiper-container {
    width: 100%;
    height: 4.4rem;
}
.swiper-main img {
    width: 100%;
    height: 4.4rem;
}
</style>
